
package briefkeys;

import java.sql.*;

public class Connector {
    public static Connection ConnectDB()  {
        try  {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            String conStr;
            conStr = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=D:\\briefkeys\\app\\Accounts.accdb;";

            Connection con = DriverManager.getConnection(conStr);
            return con;
        } catch(Exception e) {
            
        }
        return null;
    }
}